﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using IService.Data;
using IService.Model;
using IService.DataDLL;

namespace IService.Business.Manager
{
    public class ActivityManager
    {
        public DataTable GetActivityListAll()
        {
            return DTVData.ActivityManager.GetActivityListAll(typeof(Activity));
        }

        public DataTable GetLatestActivityList(int activitynum)
        {
            return DTVData.ActivityManager.GetLatestActivityList(typeof(Activity), activitynum);
        }

        public DataTable GetActivityListPagin(PagingEntity pe)
        {
            return DTVData.ActivityManager.GetActivityListPagin(typeof(Activity), pe);
        }

        public Activity GetActivityById(int Id)
        {
            Activity activity = new Activity();
            activity.ID = Id;
            return DTVData.ActivityManager.GetActivityById(activity);
        }
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="activity"></param>
        /// <returns></returns>
        public bool InsertActivity(Activity activity)
        {
            return DTVData.ActivityManager.InsertActivity(activity);
        }

        public bool UpdateActivity(Activity activity)
        {
            return DTVData.ActivityManager.UpdateActivity(activity);
        }

        public bool DeleteActivity(int Id)
        {
            Activity activity = new Activity();
            activity.ID = Id;
            return DTVData.ActivityManager.DeleteActivity(activity);
        }

        public bool DeleteActivityByIds(string Ids)
        {
            return DTVData.ActivityManager.DeleteActivityByIds(typeof(Activity), Ids);
        }
    }
}
